/*
 * Copyright (c) 2020, 2023, 3044483124@qq.com All rights reserved.
 *
 */
package cn.itcast;

import java.io.File;

/**
 * <p>Project: JavaStudy - File4
 * <p>Powered by jiangbo On 2023-01-03
 * 14:50:17
 * <p>Created by IntelliJ IDEA
 *
 * @author jiangbo [3044483124@qq.com]
 * @version 1.0
 * @since 8/17
 */
public class File4 {
    public static void main(String[] args) {
        String f = "abd.png";
        File file = new File(f);
        System.out.println(file.exists());
        System.out.println(file.isFile());
        //改名 ，移动
        file.renameTo(new File("abc.png"));
        //String path = file.getParentFile().getName(); //获取当前文件的你目录File再获取名称
        //file.renameTo(new File(path,"abc.png"));
        //删除
        //file.delete();

    }
}


